package com.IronLogistic.SqlServer;

import java.sql.ResultSet;
import java.sql.SQLException;

public class JdbcDemo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		GestorJdbc gestor = new GestorJdbc();
		try {
			gestor.conectar();
		} catch (SQLException e1) {
			
			e1.printStackTrace();
		} catch (ClassNotFoundException e1) {
			
			e1.printStackTrace();
		}
		ResultSet rs = null;
		try {
			rs = gestor.doSelect("select * from prueba1");
		} catch (SQLException e1) {
			
			e1.printStackTrace();
		}
		try {
			while(rs.next()){
			String s = rs.getString("descripcionPrueba");
			System.out.println(s);
			}
		} catch (SQLException e) {
			
			e.printStackTrace();
		}
		finally
		{
			try {
				gestor.desconectar();
			} catch (SQLException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}

	}

}


